var GetScrollWidth = function(){
    var outer = document.createElement('div');
    outer.className = 'aiui-scrollbar-wrap';
    outer.style.visibility = 'hidden';
    outer.style.width = '100px';
    outer.style.position = 'absolute';
    outer.style.top = '-9999px';
    document.body.appendChild(outer);

    var widthNoScroll = outer.offsetWidth;
    outer.style.overflow = 'scroll';

    var inner = document.createElement('div');
    inner.style.width = '100%';
    outer.appendChild(inner);
    
    var widthWithScroll = inner.offsetWidth;
    outer.parentNode.removeChild(outer);
    var scrollBarWidth = widthNoScroll - widthWithScroll;
    return  scrollBarWidth;
}
export default GetScrollWidth;